﻿<template>
    <div class=" brand-box">
        <el-form>
            <table border="1" style="text-align: center  ; border-collapse: collapse">
                <tr>
                    <td style="width: 400px ;height: 50px;">促销活动名称：
                        <el-input type="text"
                                  placeholder="录入促销活动名称"
                                  v-model="produckInfo[0].promotionName"
                                  style="width: 250px"
                                  maxlength="20" show-word-limit>
                        </el-input>

                    </td>
                    <td style="width: 400px">促销活动开始时间：
                        <el-date-picker v-model="produckInfo[0].promotionStarttime" type="datetime"
                                        placeholder="选择日期时间">
                        </el-date-picker>
                    </td>
                    <td style="width: 400px">促销活动结束时间：
                        <el-date-picker v-model="produckInfo[0].promotionStoptime" type="datetime"
                                        placeholder="选择日期时间">
                        </el-date-picker>

                    </td>
                    <td style="width: 400px">促销类型：
                        <el-radio-group v-model="produckInfo[0].promotionType">
                            <el-radio :label="1">每日限量</el-radio>
                            <el-radio :label="2">连续促销</el-radio>
                        </el-radio-group>

                    </td>
                </tr>

                <tr style="height: 230px;">
                    <td colspan="3">
                        <el-table :data="produckInfo" style="width: 100%">
                            <el-table-column fixed prop="goodId" label="商品id" width="200"></el-table-column>
                            <el-table-column prop="goodName" label="商品名字" width="300"></el-table-column>
                            <el-table-column prop="goodStock" label="商品库存数量" width="200"></el-table-column>
                            <el-table-column prop="marketPrice" label="市场价" width="200"></el-table-column>
                            <el-table-column prop="storePrice" label="商城价" width="200"></el-table-column>
                        </el-table>

                    </td>
                    <td>
                        <template>促销数量：
                            <el-input v-model="produckInfo[0].promotionNum" placeholder="请输入" style="width: 170px">
                            </el-input>
                        </template>
                        <br>
                        <template>调价方式：
                            <el-select v-model="produckInfo[0].adiustPriceWay" placeholder="请选择">
                                <el-option label="绝对值" :value="1"></el-option>
                                <el-option label="百分比" :value="2"></el-option>
                            </el-select>
                        </template>
                        <br>

                        <template>促销价格：
                            <el-input v-model="produckInfo[0].promotionPrice" placeholder="输入促销价格"
                                      style="width: 170px"
                                      :disabled="produckInfo[0].adiustPriceWay ==2">
                            </el-input>
                        </template>
                        <br>
                        <template>百分比：
                            <el-input v-model="produckInfo[0].percent" placeholder="百分比"
                                      maxlength="20" show-word-limit
                                      style="width: 170px"
                                      :disabled="produckInfo[0].adiustPriceWay ==1"></el-input>
                        </template>
                    </td>
                </tr>
                <tr style="height: 50px">
                    <td colspan="2">促销价格生效时间：
                        <el-date-picker v-model="produckInfo[0].priceTaketime"
                                        type="datetime"
                                        placeholder="选择日期时间">
                        </el-date-picker>
                    </td>
                    <td colspan="2">促销价格失效时间：
                        <el-date-picker v-model="produckInfo[0].priceLosetime"
                                        type="datetime"
                                        placeholder="选择日期时间">
                        </el-date-picker>

                    </td>
                </tr>
                <tr style="height:250px">
                    <td colspan="4">活动策划文件：
                        <el-upload drag action="https://jsonplaceholder.typicode.com/posts/" multiple>
                            <i class="el-icon-upload"></i>
                            <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
                        </el-upload>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" style="height: 120px">备注信息：
                        <el-input type="textarea" v-model="produckInfo[0].promotionRemarks"
                                  style="width: 500px"
                                  maxlength="200" show-word-limit
                                  :rows="4"></el-input>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" style="height: 50px">
                        <el-button round type="primary" @click="backtrack">返回</el-button>
                    </td>
                </tr>
            </table>
        </el-form>
    </div>
</template>

<script>
    import update from './PromotionApplyLook'

    export default update;
</script>

<style scoped lang="sass">
    @import "PromotionApplyLook"
</style>